package com.yc.mybatis.mybatisplusgenerator.enumeration;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 删除枚举，请勿修改枚举顺序，否则影响数据库中的业务逻辑.
 *
 */
public enum DeletedEnum implements IEnum<Integer> {

    NORMAL(0,"正常未删除"), DELETED(1,"已删除");
    @EnumValue
    private Integer code;

    private String msg;

    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }

    DeletedEnum(Integer code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public Integer getValue() {
        return this.code;
    }

    @Override
    public String toString() {
        return this.msg;
    }

}
